In recent years, there has been increased opportunity of using an electronic apparatus such as a digital camera or a printer as a communication apparatus by providing a wireless local area network (LAN) function and connecting to a wireless LAN. For example, PTL 1 discloses a method for easily sharing an image by providing a wireless LAN function to a digital camera.
Further, in many cases, in order to make electronic apparatuses directly connect to each other, an access point function (base station function) of the wireless LAN is built in the electronic apparatus. In general, when the electronic apparatus is provided with the wireless LAN access point function, the electronic apparatus is also provided with a dynamic host configuration protocol (DHCP) server function for controlling the allocation of an internet protocol (IP) address.
In addition, Wi-Fi Direct (registered trademark) standard is established by Wi-Fi Alliance. Wi-Fi Direct specifies a protocol for automatically determining whether to make each of the electronic apparatuses operate as a wireless LAN access point or a wireless LAN station.
Furthermore, as an optional function, Wi-Fi Direct also specifies a service discovery function, i.e., a function for advertising and searching for information of a service (service information) supported by an application included in the electronic apparatus. By using the service discovery function, the electronic apparatus can acquire service information stored in another electronic apparatus which serves as a connection destination before executing connection processing.
Using the service discovery function enables the electronic apparatus to acquire the service information provided by a communication destination apparatus before connecting thereto. However, there is a problem in which the service information of own apparatus is also notified to the communication destination apparatus, even if the own apparatus has already provided the service to a different communication destination apparatus, or the own apparatus is not supposed to provide the service to that communication destination apparatus.
The present invention is directed to a method for restricting transmission of service information according to a predetermined condition.